//公开市场操作
#pragma once
#include <core/sync/lock.h>
#include <qbmessage/include/message_bond.h>
#include <qbprotocol/include/SSFIModel.h>
#include <qbprotocol/include/SSMsgStruct.h>
#include <QString>
#include <set>

typedef enum {
	TODAY = 0,	//今日净投放
	WEEK,			//本周净投放
	MONTH		//本月净投放
}CashDeliveryType;

class CashDelivery {
public:
	CashDelivery();
	~CashDelivery();
	void setTodayData(double val);
	void setWeekData(double val);
	void setMonthData(double val);
	double getData(int emdate);
private:
	std::vector<double> data_; //日，周，月
};

class MessageReceiver;
class FIOMOData{
public:
	FIOMOData() = default;
	qb::base::Mutex& getLock() { return m_lock; };

	void reqData(MessageReceiver* msgRecv);
	bool onReceive(int32_t funcId, const qb::SSAckMsg& msg);

	double netRelease(CashDeliveryType eType);

	void calcNetRelease();

	void reqSetting(MessageReceiver* msgRecv);
	void saveSetting(MessageReceiver* msgRecv);
private:
	

public:
	std::list<xQBAPublicOptionUnit_c> m_lstPubOpr;
	std::list<QBAPubOptNetInvFactor> m_lstInv;
	std::set<int> m_setInvSetting;
	std::list<QString> m_lstFlash;
	CashDelivery m_cashDelivery;
private:
	QBAPublicOptionReq m_req;
	qb::base::Mutex m_lock;
};

